#include <glf.h>

#include <stdio.h>
#include <stdarg.h>

void glfTrace( const char *format, ... )
{
#ifdef _DEBUG
	char buffer[4096];	//Potential buffer overflow, must fix this!
	va_list args;
	char b[4096];
	va_start (args, format);
	vsprintf (buffer,format, args);
	va_end (args);
	sprintf( b, "%s\n", buffer );
	fprintf( stdout, b );
#ifdef GLF_PLATFORM_WIN32	
	OutputDebugString( b );
#endif
#endif
}